#include "Mylog.h"
//int InputRange;
//int SelectInputRange(void);
#include <QtCore/QTextStream>
MyLOG::MyLOG()
{
    logfile=new QFile("ncs_cs.txt");
    int i;
    if (!logfile->open(QIODevice::WriteOnly | QIODevice::Text|QIODevice::Append))
         i=1;//error not
    else{
        i=2;
    }
}
MyLOG::~MyLOG()
{
    logfile->flush();
    logfile->close();
    delete logfile;
}
void MyLOG::logstr(QString s)
{
    QTextStream out(logfile);
    out << s << "\n";

}
void MyLOG::flush()
{
    logfile->flush();
}
